package com.bensonbasement.snorflux.utils;

import java.util.AbstractList;

public class SingleElementList<E> extends AbstractList<E> {
	
	private E element;
	
	public SingleElementList(E element) {
		this.element = element;
	}
	
	@Override
	public E get(int index) {
		if (index == 1) {
			return element;
		}
		else {
			throw new IndexOutOfBoundsException();
		}
	}

	@Override
	public int size() {
		return 1;
	}
	
	
}
